package com.yan.feign;

import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.http.ResponseEntity;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestParam;

@FeignClient(value = "auth-ser")
public interface Oauth2FeignClient {

    @PostMapping("/oauth/token")
    ResponseEntity<JwtToken> getToken(@RequestParam("grant_type") String grantType,
                                      @RequestParam("username") String username,
                                      @RequestParam("password") String password,
                                      @RequestParam("login_type") String loginType,
                                      @RequestParam("Authorization") String basicToken);

}
